package com.aduerr.v1shouyin.unioncard;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.aduerr.v1shouyin.R;
import com.yeahka.shouyintong.sdk.action.PosSign;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * @author HI
 * @email dev1024@foxmail.com
 * @time 2019/7/16 18:17
 * @change
 * @chang time
 * @class describe
 */

public class UnionSignInActivity extends AppCompatActivity {


    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_merchant_no)
    TextView tvMerchantNo;
    @BindView(R.id.tv_merchant_name)
    TextView tvMerchantName;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_union_sign_in);
        ButterKnife.bind(this);
        PosSign.Resp resp = (PosSign.Resp) getIntent().getSerializableExtra("resp");
        tvTitle.setText("签到");
        tvMerchantName.setText(resp.merchantName);
        tvMerchantNo.setText(resp.merchantId);
    }

    @OnClick({R.id.img_back, R.id.bt_confirm})
    public void onViewClicked(View view) {
        switch(view.getId()) {
            case R.id.img_back:
                setResult(RESULT_OK);
                finish();
                break;
            case R.id.bt_confirm:
                finish();
                break;
        }
    }
}
